//
//  SW.h
//  SaplingLearning
//
//  Created by Saman Kumara on 1/19/12.
//  Copyright (c) 2012 Saman Kumara. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SWRequest.h"
#import "NSString+Trimming.h"
#import "SWDate.h"
#import "SWFile.h"
#import "SWAlert.h"
#import "SWImageView.h"

#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0];

#define COLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]

#define rfiRandomNumber(max) (arc4random() % ((unsigned)max + 1))

#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )
